#ifndef OGLBENCH1_LOADERPLY_H_
#define OGLBENCH1_LOADERPLY_H_

#include <vector>
#include "opengl_entry.h"
#include <glm/glm.hpp>

class LoaderPLY {
 public:
  bool Load(const char *filename);

  GLsizei vertex_size() const {
    return static_cast<GLsizei>(sizeof(glm::vec3) * 2);
  }
  GLsizei vertex_count() const {
    return static_cast<GLsizei>(vertex_data_.size() / 2);
  }
  GLsizei index_count() const {
    return static_cast<GLsizei>(index_data_.size());
  }

  const glm::vec3 *vertex_data() const { return &vertex_data_[0]; }
  const glm::uint *index_data() const { return &index_data_[0]; }

 private:
  std::vector<glm::vec3> vertex_data_;
  std::vector<glm::uint> index_data_;
};

#endif
